package club325.webchat.database.hibernate.dao;

import java.util.List;

import club325.webchat.database.hibernate.domain.GetPassword;
/**
 * the DAO for GetPassword
 * @author Zhangjing
 *
 */
public interface GetPasswordDAO
{
	/**
	 * insert the GetPassword into the database
	 * @param getpwd
	 * @return
	 */
	public void saveGetPassword(GetPassword getpwd);
	
	/**
	 * Find the only 'GetPassword' by id.
	 * @param id
	 * @return 
	 */
	public GetPassword findGetPasswordbyID(int id); 
	
	/**
	 * Find all the GetPassword whose memberID equals owner
	 * @param memberID
	 * @return the list of GetPassword
	 */
	public List<GetPassword> findGetPasswordbyMemberID(String owner);
	
	/**
	 * Find all the GetPassword whose question equals Q
	 * @param Q
	 * @return the List of GetPassword
	 */
	public List<GetPassword> findGetPasswordbyQuestion(String Q);
	
	/**
	 * Find all the GetPassword whose anwser equals A
	 * @param A
	 * @return the list of GetPassword
	 */
	public List<GetPassword> findGetPasswordbyAnswer(String A);
	
	/**
	 * update a GetPassword in the database
	 * @param friend
	 */
	public void UpdateGetPassword(GetPassword getpwd);
	
	/**
	 * delete a GetPassword in the database
	 * @param getpwd
	 */
	public void remove(GetPassword getpwd);
}
